<template>
    <div class="left">
        <h2>{{msg}}</h2>
        <button @click="sendMsg">送给你兄弟</button>
    </div>
</template>

<script>
export default {
    data(){
        return{
            msg:'窗前明月光'
        }
    },
    methods:{
        sendMsg(){
            this.$emit('eventLeftMsg',this.msg)
        }
    }
}
</script>

<style>
    .left{
        width: 100vw;
        height: 200px;
        background-color: springgreen;
    }
</style>